import React from "react"
import ReactDOM from "react-dom/client"

import Vote from "./views/Vote类组件"

const root = ReactDOM.createRoot(document.getElementById("root"))

root.render(
    <React.Fragment>
        <Vote title="React 非常不错哦" />
    </React.Fragment>
)

// 模拟父组件更新，
setTimeout(() => {
    root.render(
        <React.Fragment>
            <Vote title="我是5秒后传递的标题" />
        </React.Fragment>
    )
}, 5000)

console.log(React.createElement(Vote, { title: "React 非常不错哦" }))
